package com.thx.org.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thx.common.datasource.DataSource;
import com.thx.common.service.BaseManager;
import com.thx.org.dao.CompanyDao;
import com.thx.org.model.Company;
@Service
@DataSource("dataSourceB")
@Transactional(readOnly = true)
public class CompanyManager extends BaseManager<Company> {

	@Autowired
	private CompanyDao companyDao;

	private OrgManagerImpl orgMgr;

	public CompanyDao getCompanyDao() {
		return companyDao;
	}

	public void setCompanyDao(CompanyDao companyDao) {
		this.companyDao = companyDao;
	}

	public Company findByName(String comName) {
		// TODO Auto-generated method stub
		return companyDao.findByName(comName);
	}

	public void setOrgMgr(OrgManagerImpl orgMgr) {
		this.orgMgr = orgMgr;
	}

}
